﻿
Namespace LightSwitchApplication

    Public Class TruckOwnerManagement

        Private Sub TruckOwnerManagement_InitializeDataWorkspace(saveChangesTo As System.Collections.Generic.List(Of Microsoft.LightSwitch.IDataService))
            ' Write your code here.
            If Me.Id.HasValue Then
                Me.TruckOwnerProperty = Me.TruckOwner
            Else
                Me.TruckOwnerProperty = New TruckOwner()
            End If

        End Sub

        Private Sub TruckOwnerManagement_Saved()
            ' Write your code here.
            Me.Close(False)
            Application.Current.ShowDefaultScreen(Me.TruckOwnerProperty)
        End Sub

        Private Sub CarriersAddAndEditNew_CanExecute(ByRef result As Boolean)
            ' Write your code here.

        End Sub

        Private Sub CarriersAddAndEditNew_Execute()
            ' Write your code here.
            Me.Application.ShowCarrierManagement(Nothing)
        End Sub

        Private Sub CarriersEditSelected_CanExecute(ByRef result As Boolean)
            ' Write your code here.

        End Sub

        Private Sub CarriersEditSelected_Execute()
            ' Write your code here.
            Me.Application.ShowCarrierManagement(Me.Carriers.SelectedItem.Id)
        End Sub

        Private Sub OrderHeadersAddAndEditNew_CanExecute(ByRef result As Boolean)
            ' Write your code here.

        End Sub

        Private Sub OrderHeadersAddAndEditNew_Execute()
            ' Write your code here.
            Me.Application.ShowOrderManagement(Nothing)
        End Sub

        Private Sub OrderHeadersEditSelected_CanExecute(ByRef result As Boolean)
            ' Write your code here.

        End Sub

        Private Sub OrderHeadersEditSelected_Execute()
            ' Write your code here.
            Me.Application.ShowOrderManagement(Me.OrderHeaders.SelectedItem.Id)
        End Sub

        Private Sub NewTruckOwner_Execute()
            ' Write your code here.
            Me.TruckOwnerProperty = New TruckOwner()
        End Sub
    End Class

End Namespace